import Vue from 'vue'
import Router from 'vue-router'
import ShowDataList from "../pages/ShowDataList";
import ResultList from "../pages/ResultList";
import Home from "../pages/Home";
import Transform from "../pages/Transform";
import ResultDetail from "../pages/ResultDetail/ResultDetail";
import Chat from "../pages/Chat";
import Setting from "../pages/Setting";
import Image3DShow from "../pages/Image3DShow";
import Report from "../pages/report";
import LabelMange from "../pages/LabelMange";
import UserMange from "../pages/UserMange";
import ModelMange from "../pages/ModelMange";
import DataCenter from "../pages/DataCenter";
import FirstPage from "../components/firstPage";

Vue.use(Router)


export default new Router({
  routes: [
    {
      path: '/', component: Home,
      redirect: "/firstpage",
      children: [
        {path: '/datalist', component: ShowDataList},
        {path: '/resultlist', component: ResultList},
        {path: '/transform', component: Transform},
        {path: '/chat', component: Chat},
        {path: '/setting', component: Setting},
        {path: '/report', component: Report},
        {path: '/image3dshow', component: Image3DShow},
        {path: '/labelmange', component: LabelMange},
        {path: '/usermange', component: UserMange},
        {path: '/modelmange', component: ModelMange},
        {path: '/datacenter', component: DataCenter},

      ]
    },
    {path: '/firstpage', component: FirstPage},



    {
      path: '/details', name: 'Details', component: ResultDetail,
      props: (route) => ({
        // id: route.query.id,
        fileName: route.query.fileName,
      }),
    },

  ]
})
